home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / trial / MonitorIT 5.2.06 / monitorit_fullsetup.exe / data1.cab / Rpm / AdministerDataExport.asp < prev    next >
Encoding:
Text File  |  2003-06-24  |  31.7 KB  |  933 lines

  1. <html>
  2.  
  3. <head>
  4. <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
  5. <title>'Admin' Data Export</title>
  6. <link rel="stylesheet" type="text/css" href="css/rpmstyle.css">
  7.  
  8. <style>
  9.  
  10. .StatMsg { height:280; width:400; font-family:arial; font-size: 8pt; font-weight: 700; color: windowtext; background-color: threedlightshadow; }
  11. .StatMsg {  overflow : scroll}
  12.  
  13. </style>
  14.  
  15. <script>
  16. <!--
  17. var SrvLupRecCnt = 0; // Count of records returned from Servers Lookup operation
  18. var SrvRecLth = 0; // Server record Length
  19.  
  20. var LupRecCount = 0; // Count of records returned from Computer Lookup operation
  21. var ComputerRecLength = 9; // Computer Lookup record length
  22.  
  23. var GrpLupRecCount = 0; // Count of records returned from Group Lookup operation
  24. var GrpSelectIdx = 0; // Index of currently selected Group 
  25. var GroupRecLength = 4; // Length of a Group Lookup record in the Store
  26.  
  27. var ELLupRecCount = 0; // Count of records returned from EL Lookup operation
  28. var ELAgIDArr = new Array();
  29. var ELAgIDArrIndx = 0;
  30.  
  31. var ServicesRecCount = 0; // Count of records returned from Services Lookup operation
  32.  
  33. var UserLupRecCount = 0; // Count of records returned from User Lookup operation
  34. var UserRecLength = 6; // User Lookup record length
  35.  
  36. var AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation
  37. var AlertRecLength = 23; // Alert Lookup record length
  38. var ServiceType = "0", CounterType = "1", EventLogType ="2", UserType = "3";
  39.  
  40. var RptLupRecCount = 0; // Report Lookup record count
  41. var ReportRecLength = 7; // Report Lookup record length 
  42.  
  43. var SNMPTrapLupRecCount = 0; 
  44.  
  45. var bdH = 0;
  46. var byM = null;
  47. var borderSz = 2; // Thin Bord is 2pixels
  48. var Srd = null; // Server root directory
  49. var Tid = null;
  50.  
  51. // Capture and ignore script errors
  52.     window.onerror = wwScrErr;
  53. function wwScrErr() {
  54.     return true;
  55. }
  56.  
  57. /* On Load tell the Comm control to Connect to the Server */
  58. function InitRpmCC_AC() {
  59.     top.MainLoaded = true; // Flag that Main is now loaded
  60.     byM = 2*parseFloat(document.body.style.margin);
  61.     processSizeChange();
  62.     var Hp = parseInt(document.body.RPMHostPort,10);
  63.     RpmCC_AC.Connect(document.body.RPMHostIP, Hp, "");
  64. }
  65. /* On Unload tell the Comm control to Disconnect from the Server */
  66. function DiscoRpmCC_AC() {
  67.     RpmCC_AC.Disconnect();
  68.     top.banner.processStopCommX();
  69.     if ( Tid != null ) {
  70.         clearTimeout(Tid); // stop timeout routine
  71.     }
  72. }
  73. // Process Display View Size Change
  74. var SCbsy = false;
  75. function processSizeChange() {
  76.     if ( SCbsy ) 
  77.         return;
  78.     SCbsy = true;
  79.     // Display Height and Width
  80.     bCh = document.body.clientHeight;
  81.     bCw = document.body.clientWidth;
  82.     
  83.      //PopUpContext Menu
  84.    PopUpContextSize(bCw);
  85.     SCbsy = false;
  86. }
  87. function processResetButton() {
  88.     SetCursor("auto");
  89.       top.banner.processStopCommX();
  90.    StatusPrintButton.disabled = ""; // enable button   
  91. }
  92.  
  93. /* Initiate Lookup of all Admin Data */
  94. function processConnectConfirmed() {
  95.     RpmCC_AC.SecurityGet();  // Request Security State
  96.     RpmCC_AC.GetAutoAgentRegister();  // Request AutoAgentRegister State
  97.     RpmCC_AC.GetGlobalSMTP(); // Request Global SMTP address 
  98.     RpmCC_AC.GetGlobalBeeper(); // Request Global Pager/Beeper Port and Delay seconds 
  99. }
  100.  
  101. function processStartButton() {
  102.     SetButtonState(CStartButton,"1");
  103.     updateStatMessage("<br>{Exporting MonitorIT SERVER Records}<br>");
  104.     if ( RpmCC_AC.AdminServersLookup("*") ) {
  105.         updateStatMessage("Unable to start the SERVER LOOKUP request<br>");
  106.         processResetButton(); // reset
  107.     }
  108.     else { // waiting for OperationCompleteEvent
  109.         SetCursor("wait");
  110.         top.banner.processStartComm();
  111.     }
  112. }
  113. /* Process DB Error in Servers Lookup Operation */
  114. function processServersOpError() {
  115.     updateStatMessage("An error occurred during requested operation<br>");
  116.     processResetButton(); // reset
  117. }
  118. function processServersLookupRecord(ServerID,SNme,SDesc,SAddress,SPort) {
  119.     ++SrvLupRecCnt; // Bump 
  120.     var StoreObj = document.all.AC_SrvStore; // Storage 
  121.     addElementToSelect(StoreObj,SNme);
  122.     addElementToSelect(StoreObj,ServerID);
  123.     addElementToSelect(StoreObj,SDesc);
  124.     addElementToSelect(StoreObj,SAddress);
  125.     addElementToSelect(StoreObj,SPort);
  126.     SrvRecLth = 5;
  127. }
  128. /* Process Servers Lookup OP Complete Event */
  129. function processServersOpComplete() {
  130.     updateStatMessage("-Total of "+SrvLupRecCnt+" MonitorIT Server Record(s) Processed<br>");
  131.     updateStatMessage("<br>{Exporting GROUP Records}<br>");
  132.     if ( RpmCC_AC.GroupLookup("","","") ) { // Server found, try Group lookup
  133.         updateStatMessage("Unable to start the GROUP LOOKUP request<br>");
  134.         processResetButton(); // reset
  135.     }
  136. }
  137.  
  138. /* Process Group LOOKUP RECORD Event */
  139. function processGroupLookupRecord(Gid,GrpName,GrpDesc) {
  140.     GStoreObj = document.all.AC_GrpStore;
  141.     ++GrpLupRecCount;
  142.     addElementToSelect(GStoreObj,GrpName);
  143.     addElementToSelect(GStoreObj,Gid);
  144.     addElementToSelect(GStoreObj,GrpDesc);
  145.     addElementToSelect(GStoreObj,0);
  146.     GroupRecLength = 4;
  147. }
  148. /* Process DB Error in Group Lookup Operation */
  149. function processGroupOpError() {
  150.     updateStatMessage("An error occurred during GROUP LOOKUP operation<br>");
  151.     processResetButton(); // reset
  152. }
  153. /* Process Group OP Complete Event */
  154. function processGroupOpComplete() {
  155.     updateStatMessage("-Total of "+GrpLupRecCount+" Group Record(s) Processed<br>");
  156.     updateStatMessage("<br>{Exporting SERVER/COMPUTER Records}<br>");
  157.     LupRecCount = 0; // initialize record counter
  158.     ServiceCompName = null; // init the Service Record Computer Name
  159.     if ( RpmCC_AC.ComputerLookup("*","*") ) {
  160.         updateStatMessage("Unable to start the COMPUTER LOOKUP request<br>");
  161.         processResetButton(); // reset
  162.     }
  163. }
  164. /* Process Computer LOOKUP RECORD Event */
  165. function processComputerLookupRecord(Cid,Gid,SrvID,Name,Desc,Pswd,OSVer,Addr,Port) {
  166.     ++LupRecCount; // bump record received counter
  167.     StoreObj = AC_Store; // Storage 
  168.     addElementToSelect(StoreObj,Name);
  169.     addElementToSelect(StoreObj,getGroupName(Gid));
  170.     addElementToSelect(StoreObj,Desc);
  171.     addElementToSelect(StoreObj,Pswd);
  172.     addElementToSelect(StoreObj,OSVer);
  173.     addElementToSelect(StoreObj,Addr);
  174.     addElementToSelect(StoreObj,Port);
  175.     addElementToSelect(StoreObj,getServerName(SrvID));
  176.     addElementToSelect(StoreObj,Cid);
  177. }
  178. /* Process DB Error in Computer Lookup Operation */
  179. function processComputerOpError() {
  180.     updateStatMessage("An error occurred during requested operation<br>");
  181.     processResetButton(); // reset
  182. }
  183.  
  184. /* Process Computer OP Complete Event */
  185. function processComputerOpComplete() {
  186.     updateStatMessage("-Total of "+LupRecCount+" Server/Computer Record(s) Processed<br>");
  187.     updateStatMessage("<br>{Exporting WATCH/ALERT Records}<br>");
  188.     AlertLupRecCount = 0; // clear Lookup record counter
  189.     if ( RpmCC_AC.AlertGroupLookup("*") ) {
  190.         updateStatMessage("Unable to start the Alert LOOKUP request<br>");
  191.     }
  192. }
  193. function AlertLupRecPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs) {
  194.     ++AlertLupRecCount; // bump record received counter
  195.     StoreObj = document.all.AC_AlertStore; // Storage
  196.     if ( getAlertName(AlID) == "" ) { // if not received yet
  197.         addElementToSelect(StoreObj,AlName); //+0
  198.         addElementToSelect(StoreObj,AlID);
  199.         addElementToSelect(StoreObj,AlDesc);
  200.         addElementToSelect(StoreObj,AlThresh);
  201.         addElementToSelect(StoreObj,AlOver); //+4
  202.         addElementToSelect(StoreObj,AlEveryTime);
  203.         addElementToSelect(StoreObj,AlDur);
  204.         addElementToSelect(StoreObj,AlSched);
  205.         addElementToSelect(StoreObj,AlSDT);
  206.         addElementToSelect(StoreObj,AlEDT); //+9
  207.         addElementToSelect(StoreObj,AlArrayIDs); //+10
  208.         /* allocate space for Part 2 */
  209.         addElementToSelect(StoreObj,""); //+11
  210.         addElementToSelect(StoreObj,"");
  211.         addElementToSelect(StoreObj,"");
  212.         addElementToSelect(StoreObj,""); //+14
  213.         addElementToSelect(StoreObj,"");
  214.         addElementToSelect(StoreObj,"");
  215.         addElementToSelect(StoreObj,"");
  216.         addElementToSelect(StoreObj,"");
  217.         addElementToSelect(StoreObj,""); //+19
  218.         addElementToSelect(StoreObj,"");
  219.         addElementToSelect(StoreObj,"");
  220.         addElementToSelect(StoreObj,""); //+22
  221.     }
  222.     else { // already received Part 2, update Part 1
  223.         ASix = AlertSelectIdx * AlertRecLength;
  224.         StoreObj.options[ASix+0].text = AlName;
  225.         StoreObj.options[ASix+2].text = AlDesc;
  226.         StoreObj.options[ASix+3].text = AlThresh;
  227.         StoreObj.options[ASix+4].text = AlOver;
  228.         StoreObj.options[ASix+5].text = AlEveryTime;
  229.         StoreObj.options[ASix+6].text = AlDur;
  230.         StoreObj.options[ASix+7].text = AlSched;
  231.         StoreObj.options[ASix+8].text = AlSDT;
  232.         StoreObj.options[ASix+9].text = AlEDT;
  233.         StoreObj.options[ASix+10].text = AlArrayIDs;
  234.     }
  235. }
  236.  
  237. function AlertLupRecPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend) {
  238.     StoreObj = document.all.AC_AlertStore; // Storage
  239.     if ( getAlertName(AlID) == "" ) { // if not received yet
  240.         // allocate space for Part 1
  241.         addElementToSelect(StoreObj,"name"); //+0
  242.         addElementToSelect(StoreObj,AlID);
  243.         addElementToSelect(StoreObj,"");
  244.         addElementToSelect(StoreObj,"");
  245.         addElementToSelect(StoreObj,""); //+4
  246.         addElementToSelect(StoreObj,"");
  247.         addElementToSelect(StoreObj,"");
  248.         addElementToSelect(StoreObj,"");
  249.         addElementToSelect(StoreObj,"");
  250.         addElementToSelect(StoreObj,""); //+9
  251.         addElementToSelect(StoreObj,""); //+10
  252.         /* save Part 2 */
  253.         addElementToSelect(StoreObj,AlRunProg); //+11
  254.         addElementToSelect(StoreObj,AlProgNme);
  255.         addElementToSelect(StoreObj,AlProgramArgs);
  256.         addElementToSelect(StoreObj,AlENotify); //+14
  257.         addElementToSelect(StoreObj,AlEAddr);
  258.         addElementToSelect(StoreObj,AlESubj);
  259.         addElementToSelect(StoreObj,AlPhNotify);
  260.         addElementToSelect(StoreObj,AlPhNumber);
  261.         addElementToSelect(StoreObj,AlTextToSpeak); //+19
  262.         addElementToSelect(StoreObj,AlPgNotify);
  263.         addElementToSelect(StoreObj,AlPgNumber);
  264.         addElementToSelect(StoreObj,AlTextToSend); //+22
  265.     }
  266.     else { // already received Part 2, update Part 1
  267.         ASix = AlertSelectIdx * AlertRecLength;
  268.         StoreObj.options[ASix+11].text = AlRunProg;
  269.         StoreObj.options[ASix+12].text = AlProgNme;
  270.         StoreObj.options[ASix+13].text = AlProgramArgs;
  271.         StoreObj.options[ASix+14].text = AlENotify;
  272.         StoreObj.options[ASix+15].text = AlEAddr;
  273.         StoreObj.options[ASix+16].text = AlESubj;
  274.         StoreObj.options[ASix+17].text = AlPhNotify;
  275.         StoreObj.options[ASix+18].text = AlPhNumber;
  276.         StoreObj.options[ASix+19].text = AlTextToSpeak;
  277.         StoreObj.options[ASix+20].text = AlPgNotify;
  278.         StoreObj.options[ASix+21].text = AlPgNumber;
  279.         StoreObj.options[ASix+22].text = AlTextToSend;
  280.     }
  281. }
  282. /* Process DB Error in Alert Lookup Operation */
  283. function processAlertOpError() {
  284.     updateStatMessage("An error occurred during Alert LOOKUP operation<br>");
  285.     processResetButton(); // reset
  286. }
  287. /* Get Alert Name from Store based on Alert ID */
  288. function getAlertName(UID) {
  289.     UNobj = document.all.AC_AlertStore; // get object
  290.     AlertName = "";
  291.     for (i=0, j=0; i < UNobj.length; ++j, i+=AlertRecLength) {
  292.         if ( UNobj.options[i+1].text == UID ) {
  293.             AlertSelectIdx = j;
  294.             AlertName = UNobj.options[i].text;
  295.             break;
  296.         }
  297.     }
  298.     return AlertName;
  299. }
  300. /* Process AlertGroupLookup Complete Event */
  301. function processAlertOpComplete() {
  302.     //processCounterAlerts();
  303.     updateStatMessage("-Total of "+AlertLupRecCount+" Watch/Alert Record(s) Processed<br>");    
  304.     updateStatMessage("<br>{Exporting SERVICES Records}<br>");
  305.     ServicesRecCount = 0; // reset count
  306.     if ( RpmCC_AC.ServicesLookup("","","ComputerID,ID DESC") ) { // if unable to initiate request        
  307.         updateStatMessage("Unable to start the Services LOOKUP request<br>");
  308.         processResetButton(); // reset
  309.     }
  310. }
  311. // Process Services LOOKUP Record Event
  312. function processServicesRecord(SRVstrg) {
  313.     var warr = new Array();
  314.     // strip off the Services ID
  315.     var ix = SRVstrg.indexOf("~");
  316.     SRVstrg = SRVstrg.substring(ix+1,SRVstrg.length);
  317.     warr = SRVstrg.split("~");
  318.     warr[0] = getComputerName(warr[0]); // get Computer Name in place of ID
  319.     warr[1] = getAlertGroupName(warr[1]);
  320.     SRVstrg = warr.join("~");
  321.      addElementToSelect(AC_ServicesStore,SRVstrg);
  322.     ++ServicesRecCount; // bump record counter
  323. }
  324. // Process Services Operation Complete Event
  325. function processServicesOpComplete() {
  326.     updateStatMessage("-Total of "+ServicesRecCount+" Services Record(s) Processed<br>");
  327.     updateStatMessage("<br>{Exporting EVENT LOG WATCH Records}<br>");
  328.     ELLupRecCount = 0; // Clear Counter
  329.     // See if any Alert Groups are Event Log types
  330.     for ( var i=0, j=0; i<AC_AlertStore.length; i+=AlertRecLength ) {
  331.         CSdt = AC_AlertStore.options[i+8].text; // check type
  332.         if ( CSdt == "01/01/1999 11:40:00" || CSdt == "1/1/1999 11:40:0" ) { 
  333.             ELAgIDArr[j++] = AC_AlertStore.options[i+1].text;// save AGID
  334.        }
  335.    }
  336.    // Go start Event Log record lookuo if any
  337.    processELMonitorOpComplete();
  338. }
  339. // Process EL Lookup Op Complete
  340. function processELMonitorOpComplete() {
  341.     if ( ELAgIDArrIndx >= ELAgIDArr.length ) { //if no more Event Log Alerts
  342.         processEventLogDone();
  343.     }
  344.     else {
  345.         if ( RpmCC_AC.ELMonitorLookupByAlertGroup(ELAgIDArr[ELAgIDArrIndx++]) ) {
  346.             updateStatMessage("Unable to start the EventLog Watch LOOKUP request<br>");
  347.             processResetButton(); // reset
  348.         }
  349.     }
  350. }
  351. // Process EL Lookup Record
  352. function processELMonitorLookupRecord(ELstrg) {
  353.     var warr = new Array();
  354.     // strip off the EL ID
  355.     var ix = ELstrg.indexOf("~");
  356.     ELstrg = ELstrg.substring(ix+1,ELstrg.length);
  357.     warr = ELstrg.split("~");
  358.     warr[1] = getComputerName(warr[1]); // get Computer Name in place of ID
  359.     warr[2] = getAlertGroupName(warr[2]);
  360.     ELstrg = warr.join("~");
  361.      addElementToSelect(AC_ELStore,ELstrg);
  362.     ++ELLupRecCount; // bump record counter
  363. }
  364. /* Process DB Error in EL Lookup Operation */
  365. function processELMonitorOpError() {
  366.    updateStatMessage("An error occurred during EventLog Watch LOOKUP operation<br>");
  367.     processResetButton(); // reset
  368. }
  369. function processEventLogDone() {
  370.     updateStatMessage("-Total of "+ELLupRecCount+" EVENT LOG WATCH Record(s) Processed<br>");
  371.     updateStatMessage("<br>{Exporting USER Records}<br>");
  372.     UserLupRecCount = 0; // clear Lookup record counter
  373.     if ( RpmCC_AC.UserLookup("","") ) {
  374.         updateStatMessage("Unable to start the User LOOKUP request<br>");
  375.         processResetButton(); // reset
  376.     }
  377. }
  378. /* Process User LOOKUP RECORD Event */
  379. function processUserLookupRecord(Uid,UserName,UserDesc,UPswd,UAAdm,UAAnl) {
  380.     ++UserLupRecCount; // bump record received counter
  381.     StoreObj = AC_UserStore; // Storage
  382.     UAAdm = (UAAdm == "0") ? "" : "checked";
  383.     UAAnl = (UAAnl == "0") ? "": "checked";
  384.     addElementToSelect(StoreObj,UserName);
  385.     addElementToSelect(StoreObj,Uid);
  386.     addElementToSelect(StoreObj,UserDesc);
  387.     addElementToSelect(StoreObj,UPswd);
  388.     addElementToSelect(StoreObj,UAAdm);
  389.     addElementToSelect(StoreObj,UAAnl);
  390. }
  391. /* Process DB Error in User Lookup Operation */
  392. function processUserOpError() {
  393.     updateStatMessage("An error occurred during User LOOKUP operation<br>");
  394.     processResetButton(); // reset
  395. }
  396. /* Process User OP Complete Event */
  397. function processUserOpComplete() {
  398.     updateStatMessage("-Total of "+UserLupRecCount+" User Record(s) Processed<br>");
  399.     updateStatMessage("<br>{Exporting REPORT Records}<br>");
  400.     if ( RpmCC_AC.AdminReportsLookup("*") ) {
  401.         updateStatMessage("Unable to start the REPORT LOOKUP request<br>");
  402.         processResetButton(); // reset
  403.     }
  404. }
  405. /* Process Report LOOKUP RECORD Event */
  406. function processReportLookupRecord(Rid,RptName,RptDesc,RptD_T,AIA,CIA,MaxIntv) {
  407.     ++RptLupRecCount; // bump record received counter
  408.     RStoreObj = document.all.AR_RptStore; // Storage 
  409.     addElementToSelect(RStoreObj,RptName);
  410.     addElementToSelect(RStoreObj,Rid);
  411.     addElementToSelect(RStoreObj,RptDesc);
  412.     addElementToSelect(RStoreObj,RptD_T);
  413.     addElementToSelect(RStoreObj,AIA);
  414.     addElementToSelect(RStoreObj,getComputerNameArray(CIA));
  415.     addElementToSelect(RStoreObj,MaxIntv);
  416.     ReportRecLength = 7; // length of a Storage record
  417. }
  418. /* Process Report OP Complete Event */
  419. function processReportOpComplete() {
  420.     updateStatMessage("-Total of "+RptLupRecCount+" Report Record(s) Processed<br>");
  421.     // Process SNMP records
  422.     updateStatMessage("<br>{Exporting SNMP Trap WATCH Records}<br>");
  423.     // Get OID definitions
  424.     if ( RpmCC_AC.EnumOidDefs() ) { // if unable to initiate request        
  425.         updateStatMessage("Unable to start the OID Defs LOOKUP request<br>");
  426.         processResetButton(); // reset
  427.     }
  428. }
  429. function processOIDDefs(ostrg) {
  430.     AC_TrapMonitorStore.OIDDefs = ostrg; // save OID Defs string
  431.     if ( RpmCC_AC.EnumSnmpTrapMonitor() ) { // if unable to initiate request    
  432.         updateStatMessage("Unable to start the SNMP Trap Monitor LOOKUP request<br>");
  433.         processResetButton(); // reset
  434.     }
  435. }
  436. function processEnumSnmpTrapMonitor(TMstrg) {
  437.     var warr = new Array();
  438.     // If done reading all records
  439.     if ( TMstrg == "Done" ) {
  440.         processSNMPComplete();
  441.     }
  442.     else {
  443.         // Check if error
  444.         warr = TMstrg.split(":");
  445.         if ( warr[0] == "Err" ) {
  446.             updateStatMessage("An Error occurred reading SNMP Trap WATCH records<br>");
  447.             processResetButton(); // reset
  448.          }
  449.          // Otherwise, process record
  450.         else {
  451.             warr = TMstrg.split("~");
  452.             warr[2] = getComputerName(warr[2]); // get Computer Name in place of ID
  453.             warr[3] = getAlertGroupName(warr[3]);
  454.             TMstrg = warr.join("~");
  455.               addElementToSelect(AC_TrapMonitorStore,TMstrg); // TrapMonitor Record
  456.               ++SNMPTrapLupRecCount;
  457.           }
  458.       }
  459. }
  460. function processSNMPComplete() {
  461.     updateStatMessage("-Total of "+SNMPTrapLupRecCount+" SNMP Trap WATCH Record(s) Processed<br>");
  462.     updateStatMessage("<br>");
  463.     RpmCC_AC.GetServerRootDir();    // get server root directory; wait for response
  464. }
  465. function AdminDataWrite() {
  466.     Tid = null;
  467.     var wH = RpmCC_AC.CreateLocalFile(Srd+"\\AdminData.sav");
  468.     if ( wH == 0 ) {
  469.         updateStatMessage("Error creating file to save 'Admin' Data<br>");
  470.     }
  471.     else {
  472.         var aD = AdminDataStore.innerHTML;// get data
  473.         var bytesW = RpmCC_AC.WriteLn(wH,aD);
  474.         RpmCC_AC.CloseLocalFile(wH);
  475.         if ( bytesW <= 0 ) {
  476.             updateStatMessage("Error writing 'Admin' Data<br>");
  477.         }
  478.        else {
  479.             updateStatMessage("Done Exporting 'Admin' Data<br>");
  480.             RpmCC_AC.RegSetKey("AdminDataSaved","1"); // save flag
  481.         }
  482.     }
  483.     top.Rstatus.Pstat("Done!");
  484.     processResetButton(); // reset
  485. }
  486. /* Process DB Error in Report Lookup Operation */
  487. function processReportOpError() {
  488.     updateStatMessage("An error occurred during Report LOOKUP operation<br>");
  489.     processResetButton(); // reset
  490. }
  491.  
  492. function SetButtonState(BtObj,BState) {
  493.     BtObj.disabled = (BState == "0") ? "" : "disabled";
  494.     BtObj.bdis = BState;
  495. }
  496.  
  497. /* Add an <Option> entry with the text to the specified <Select> */
  498. function addElementToSelect(SelectObj,text) {
  499.     var el = document.createElement("OPTION");
  500.     el.text = text;
  501.     SelectObj.options.add(el);
  502.     return el;
  503. }
  504. /* Get Group Name from Store based on Group ID */
  505. function getGroupName(Gid) {
  506.     var GrpName = "";
  507.     for (var i=0; i < AC_GrpStore.length; i+=GroupRecLength) {
  508.         if ( AC_GrpStore.options[i+1].text == Gid ) {
  509.             GrpName = AC_GrpStore.options[i].text;
  510.             break;
  511.         }
  512.     }
  513.     return GrpName;
  514. }
  515. function getServerName(Sid) {
  516.     var SrvName = "";
  517.     for (var i=0; i < AC_SrvStore.length; i+=SrvRecLth) {
  518.         if ( AC_SrvStore.options[i+1].text == Sid ) {
  519.             SrvName = AC_SrvStore.options[i].text;
  520.             break;
  521.         }
  522.     }
  523.     return SrvName;
  524. }
  525. function getComputerName(Cid) {
  526.     var CName = "";
  527.     for (var i=0; i < AC_Store.length; i+=ComputerRecLength) {
  528.         if ( AC_Store.options[i+8].text == Cid ) {
  529.             CName = AC_Store.options[i].text;
  530.             break;
  531.         }
  532.     }
  533.     return CName;
  534. }
  535. function getComputerNameArray(CIA) {
  536.     var warr = new Array();
  537.     warr = CIA.split(","); // split out the Computer IDs
  538.     for ( var j=0; j<warr.length; j++ ) {
  539.         for (var i=0; i < AC_Store.length; i+=ComputerRecLength) {
  540.             if ( AC_Store.options[i+8].text == warr[j] ) {
  541.                 warr[j] = AC_Store.options[i].text;
  542.                 break;
  543.             }
  544.         }
  545.    }
  546.     var newCIA = warr.join(",");
  547.     return newCIA;
  548. }
  549. function getAlertGroupName(AGID) {
  550.     var AGN = "";
  551.     for ( var i=0; i<AC_AlertStore.length; i+=AlertRecLength ) {
  552.        if ( AC_AlertStore.options[i+1].text == AGID ) {
  553.            AGN = AC_AlertStore.options[i].text; // get Alert Group Name
  554.            break;
  555.        }
  556.    }
  557.    return AGN;
  558. }
  559. function processCounterAlerts() {
  560.     var OCarr = new Array();
  561.     var warr = new Array();
  562.     var UNobj = document.all.AC_AlertStore; // get object
  563.     for (var i=0; i < UNobj.length; ++j, i+=AlertRecLength) {
  564.         if ( getCurrentAT(UNobj.options[i+8].text) == CounterType ) {
  565.             OCarr = UNobj.options[i+10].text.split(";"); // get C,O,Cnt triplets
  566.             for ( var j=0; j<OCarr.length; j++ ) {
  567.                warr = OCarr[j].split(","); // split out Cid
  568.                warr[0] = getComputerName(warr[0]); // convert CID to Name
  569.                OCarr[j] = warr.join(","); // reform
  570.             }
  571.             UNobj.options[i+10].text = OCarr.join(";"); // put triplets back
  572.         }
  573.     }
  574. }
  575.  
  576. function getCurrentAT(CSdt) {
  577.     // Determine Alert Type
  578.     if ( CSdt == "01/01/1999 11:30:00" || CSdt == "1/1/1999 11:30:0" ) { 
  579.         CurAT = ServiceType;
  580.     }
  581.     else if ( CSdt == "01/01/1999 11:50:00" || CSdt == "1/1/1999 11:50:0" ) { 
  582.         CurAT = UserType;
  583.     }
  584.     else if ( CSdt == "01/01/1999 11:40:00" || CSdt == "1/1/1999 11:40:0" ) { 
  585.         CurAT = EventLogType;
  586.     }
  587.     else {
  588.         CurAT = CounterType;
  589.     }
  590.     return CurAT;
  591. }    
  592.  
  593. function SetCursor(ctyp) {
  594.     document.body.style.cursor=ctyp;
  595. }
  596. function updateStatMessage(sMsg) {
  597.     if ( top.banner.IE55orBetter ) {
  598.         StatusMessage.insertAdjacentHTML("beforeEnd",sMsg);
  599.         StatusMessage.scrollIntoView(false);
  600.     }
  601.     else {
  602.         StatusMessageDiv.insertAdjacentHTML("beforeEnd",sMsg);
  603.     }
  604. }
  605.  
  606. function PopUpContextOpen() {
  607. }
  608. function PopUpContextClose() {
  609. }
  610.  
  611. // Print Status
  612. var DiscStatWindow = null;
  613. function processPrintStatus() {
  614.     if ( !top.banner.IE55orBetter ) {
  615.         alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site");
  616.         return;
  617.     }
  618.     FakeBut.click();    // simulate event to call "savePageCoord(...)"
  619.     var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw
  620.     wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars";
  621.     var rName = ""+Math.random(); // use Random number to get unique Window name
  622.     rName = rName.substring(2,rName.length);
  623.     DiscStatWindow = window.open("",rName,wprop);
  624.     if ( DiscStatWindow == null ) {
  625.         return;   
  626.     }
  627.     var dh = "<html><head><title>MonitorIT - 'Admin' Data EXPORT Status Report</title>";
  628.     dh += "<link rel='stylesheet' type='text/css' href='css/Rpmstyle.css'>";
  629.     dh += "<style>#StatusMessage {height:280; width:400; font-family:arial; ";
  630.     dh += "font-size: 10pt; font-weight: 700; color: windowtext;}</style></head><body";
  631.     dh += " title='Exit to Close Window when Printing is complete'>"; 
  632.     dh += StatusMessageDiv.innerHTML;
  633.     dh += '<script LANGUAGE="JavaScript">window.focus();';
  634.     dh += ' </script></body></html>';
  635.     DiscStatWindow.document.open();
  636.     DiscStatWindow.document.write(dh)
  637.     DiscStatWindow.document.close();
  638.     DiscStatWindow.print();
  639. }
  640.  
  641.  
  642. //-->
  643. </script>
  644. <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script>
  645.     
  646. </head>
  647.  
  648. <body class="bodyc" style="margin:2px;" RPMHostIP="!BreakoutBot:MonitorIP!"
  649. RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" RPMCollectorPort="!BreakoutBot:CollectorPort!" RPMAgentPort="!BreakoutBot:AgentListenPort!"
  650. onload="top.banner.savePageCoord(event,document.body,'AdminDataBase');InitRpmCC_AC();" onbeforeunload="DiscoRpmCC_AC()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()">
  651.  
  652. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="EnumSnmpTrapMonitor(TMstrg)">
  653. <!--
  654. processEnumSnmpTrapMonitor(TMstrg);
  655. //-->
  656. </script> 
  657.  
  658. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="EnumOidDefs(ostrg)">
  659. <!--
  660. processOIDDefs(ostrg);
  661. //-->
  662. </script> 
  663.  
  664. <script FOR="RpmCC_AC" EVENT="GlobalSMTP(SMTPstrg)">
  665. <!--
  666. AC_AlertStore.SMTPSetting = SMTPstrg;
  667. //-->
  668. </script>
  669.  
  670. <script FOR="RpmCC_AC" EVENT="GlobalBeeper(BEEPstrg)">
  671. <!--
  672. AC_AlertStore.BeeperSetting = BEEPstrg;
  673. //-->
  674. </script>
  675.  
  676. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="ServerRootDir(srvrdir)">
  677. <!--
  678. Srd = srvrdir;
  679. Tid = setTimeout("AdminDataWrite()",100); // Delay then process
  680. //-->
  681. </script>
  682.  
  683. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="Connected()">
  684. <!--
  685. processConnectConfirmed();
  686. //-->
  687. </script> 
  688.  
  689. <script FOR="RpmCC_AC" EVENT="ServicesRecord(SRVstrg)">
  690. <!--
  691. processServicesRecord(SRVstrg);
  692. //-->
  693. </script>
  694.  
  695. <script FOR="RpmCC_AC" EVENT="ServicesOpComplete()">
  696. <!--
  697. processServicesOpComplete();
  698. //-->
  699. </script> 
  700.  
  701. <script FOR="RpmCC_AC" EVENT="ServicesOpError()">
  702. <!--
  703. processComputerOpError();
  704. //-->
  705. </script>
  706.  
  707. <script FOR="RpmCC_AC" EVENT="ComputerOpError()">
  708. <!--
  709. processComputerOpError();
  710. //-->
  711. </script>
  712.  
  713. <script FOR="RpmCC_AC" EVENT="ComputerLookupRecord(Cid,Gid,SrvID,Nme,Desc,Pswd,OSVer,Addr,Port)">
  714. <!--
  715. processComputerLookupRecord(Cid,Gid,SrvID,Nme,Desc,Pswd,OSVer,Addr,Port);
  716. //-->
  717. </script>
  718.  
  719. <script FOR="RpmCC_AC" EVENT="ComputerOpComplete()">
  720. <!--
  721. processComputerOpComplete();
  722. //-->
  723. </script> 
  724.  
  725. <script FOR="RpmCC_AC" EVENT="GroupOpComplete()">
  726. <!--
  727. processGroupOpComplete();
  728. //-->
  729. </script> 
  730.  
  731. <script FOR="RpmCC_AC" EVENT="GroupOpError()">
  732. <!--
  733. processGroupOpError();
  734. //-->
  735. </script>
  736.  
  737. <script FOR="RpmCC_AC" EVENT="GroupLookupRecord(Gid,GNme,GDesc)">
  738. <!--
  739. processGroupLookupRecord(Gid,GNme,GDesc);
  740. //-->
  741. </script> 
  742.  
  743. <script FOR="RpmCC_AC" EVENT="ServersOpComplete()">
  744. <!--
  745. processServersOpComplete();
  746. //-->
  747. </script> 
  748.  
  749. <script FOR="RpmCC_AC" EVENT="ServersOpError()">
  750. <!--
  751. processServersOpError();
  752. //-->
  753. </script>
  754.  
  755. <script FOR="RpmCC_AC" EVENT="ServersLookupRecord(ServerID,SNme,SDesc,SAddress,SPort)">
  756. <!--
  757. processServersLookupRecord(ServerID,SNme,SDesc,SAddress,SPort);
  758. //-->
  759. </script> 
  760.  
  761. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="SecuritySetting(secVal)">
  762. <!--
  763. AC_UserStore.SecuritySetting = secVal;
  764. //-->
  765. </script> 
  766.  
  767. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="SecurityOpError()">
  768. <!--
  769. updateStatMessage("Error reading Global Security setting<br>");
  770. //-->
  771. </script> 
  772.  
  773. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="AutoAgentRegSetting(aarVal)">
  774. <!--
  775. AC_UserStore.AutoAgentSetting = aarVal;
  776. //-->
  777. </script> 
  778.  
  779. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="AutoAgentRegOpOpError()">
  780. <!--
  781. updateStatMessage("Error reading Automatic Agent Registration setting<br>");
  782. //-->
  783. </script> 
  784.  
  785. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="UserOpComplete()">
  786. <!--
  787. processUserOpComplete();
  788. //-->
  789. </script>
  790.  
  791. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="UserOpError()">
  792. <!--
  793. processUserOpError();
  794. //-->
  795. </script> 
  796.     
  797. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="UserLookupRecord(Uid,UNme,UDesc,UPswd,UAAdm,UAAnl)">
  798. <!--
  799. processUserLookupRecord(Uid,UNme,UDesc,UPswd,UAAdm,UAAnl);
  800. //-->
  801. </script>
  802.  
  803. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="AdminReportsOpComplete()">
  804. <!--
  805. processReportOpComplete();
  806. //-->
  807. </script>
  808.  
  809. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="AdminReportsOpError()">
  810. <!--
  811. processReportOpError();
  812. //-->
  813. </script> 
  814.  
  815. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="AdminReportsLookupRecord(Rid,RNme,RDesc,RptD_T,AIA,CIA,MaxIntv)">
  816. <!--
  817. processReportLookupRecord(Rid,RNme,RDesc,RptD_T,AIA,CIA,MaxIntv);
  818. //-->
  819. </script>
  820.  
  821. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="ELMonitorOpComplete()">
  822. <!--
  823. processELMonitorOpComplete();
  824. //-->
  825. </script> 
  826.  
  827. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="ELMonitorOpError()">
  828. <!--
  829. processELMonitorOpError();
  830. //-->
  831. </script> 
  832.  
  833. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="ELMonitorLookupRecord(ELCrec)">
  834. <!--
  835. processELMonitorLookupRecord(ELCrec);
  836. //-->
  837. </script> 
  838.  
  839. <script FOR="RpmCC_AC" EVENT="StartCommunication()">
  840. <!--
  841. top.banner.processStartComm();
  842. //-->
  843. </script> 
  844. <script FOR="RpmCC_AC" EVENT="StopCommunication()">
  845. <!--
  846. top.banner.processStopComm();
  847. //-->
  848. </script> 
  849.  
  850. <script LANGUAGE="JavaScript" FOR="RpmCC_AC"
  851. EVENT="AlertGroupLookupRecordPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs)">
  852. <!--
  853. AlertLupRecPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs);
  854. //-->
  855. </script>
  856.  
  857. <script LANGUAGE="JavaScript" FOR="RpmCC_AC"
  858. EVENT="AlertGroupLookupRecordPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend)">
  859. <!--
  860. AlertLupRecPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend);
  861. //-->
  862. </script>
  863.  
  864. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="AlertGroupOpComplete()">
  865. <!--
  866. processAlertOpComplete();
  867. //-->
  868. </script> 
  869.  
  870. <script LANGUAGE="JavaScript" FOR="RpmCC_AC" EVENT="AlertGroupOpError()">
  871. <!--
  872. processAlertOpError();
  873. //-->
  874. </script> 
  875.  
  876. <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script>
  877.  
  878. <!-- Invisible Object to Support Simulated Click Event -->
  879. <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'AdminDataExport')">
  880. </button>
  881.  
  882. <object ID="RpmCC_AC" NAME="RpmCC_AC" WIDTH="14" HEIGHT="1" style="display: none"
  883. CLASSID="CLSID:D88C2358-FC83-11D1-BF49-00104B2D6F80"
  884. CODEBASE="controls/RPMComm.cab#version=5,2,0,0">
  885.   <param name="_Version" value="65536">
  886.   <param name="_ExtentX" value="2646">
  887.   <param name="_ExtentY" value="1371">
  888.   <param name="_StockProps" value="0">
  889. </object>
  890.  
  891. <!--<br>-->
  892. <div id="TopL" align="center"><center>
  893.  
  894. <div><center>
  895.  
  896. <table class="fldset" border="2" width="475" cellspacing="2" cellpadding="2" height="150">
  897.   <tr>
  898.     <td>
  899.      <table border="1"  borderColor="menu" align="left">
  900.         <tr><td borderColorDark="graytext" borderColorLight="white" height="25" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/DataSave.gif" align="absmiddle" height="17" width="16"> 'Admin' Data Export </td><td width="*"></td>
  901.         </tr></table>
  902.     </td>
  903.   </tr>
  904.   <tr>
  905.     <td>
  906.      <table border="0">
  907.        <tr><td width="70" align="center" height="300"><img src="images/DataSave.gif" align="absmiddle" height="25" width="24"></td><td width="*"><div class="StatMsg" id="StatusMessageDiv"><span id="StatusMessage">Press Start Button to Begin Export of 'Admin' Data<br></span></div><div id="AdminDataStore" style="display:none">
  908.         <select SIZE="1" NAME="AC_Store" style="display: none"></select>
  909.         <select SIZE="1" NAME="AC_GrpStore" style="display: none"></select>
  910.         <select SIZE="1" NAME="AC_SrvStore" style="display: none"></select>
  911.         <select SIZE="1" NAME="AC_ServicesStore" style="display: none"></select>
  912.         <select SIZE="1" NAME="AC_UserStore" AutoAgentSetting="1" SecuritySetting="0" style="display: none"></select>
  913.           <select SIZE="1" NAME="AC_AlertStore" SMTPSetting="" BeeperSetting="" style="display: none"></select>
  914.         <select SIZE="1" NAME="AR_RptStore" style="display: none"></select>
  915.         <select SIZE="1" NAME="AC_ELStore" style="display: none"></select>
  916.         <select SIZE="1" NAME="AC_TrapMonitorStore" OIDDefs="" style="display: none"></select>
  917.              </div></td>
  918.           </tr>
  919.         </table>
  920.        </td>
  921.    </tr>
  922.   <tr>
  923.     <td width="650" align="center" height="30">
  924.     <button id="CStartButton" title="Start the Process to Save Database 'Admin' Data" onclick="if (this.bdis == '0'){ processStartButton();}" bdis="0" style="width:80px; height:28px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" ><img src="images/apply.gif" align="absmiddle" height="16" width="16"> Start</button> <button id="StatusPrintButton" title="Print 'Admin' Data Export Status Log" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:85px; height:29px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button></td></tr>
  925.  
  926. </table>
  927.  
  928. </center></div>
  929.  
  930. </center></div>
  931. </body>
  932. </html>
  933.